home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2000 September / maximum-cd-2000-09.iso / Benchmarks / Quake 3 / q3ademo.exe / Main / pak0.pk3 / botfiles / weapons.c < prev   
Encoding:
C/C++ Source or Header  |  1999-11-29  |  5.4 KB  |  220 lines

  1. //===========================================================================
  2. //
  3. // Name:            weapons.c
  4. // Function:        weapon configuration
  5. // Programmer:        Mr Elusive (MrElusive@idsoftware.com)
  6. // Last update:        1999-09-08
  7. // Tab Size:        4 (real tabs)
  8. //===========================================================================
  9.  
  10. #include "inv.h"
  11. #include "game.h"
  12.  
  13. #define VEC_ORIGIN                        {0, 0, 0}
  14. //projectile flags
  15. #define PFL_WINDOWDAMAGE            1        //projectile damages through window
  16. #define PFL_RETURN                    2        //set when projectile returns to owner
  17. //weapon flags
  18. #define WFL_FIRERELEASED            1        //set when projectile is fired with key-up event
  19. //damage types
  20. #define DAMAGETYPE_IMPACT            1        //damage on impact
  21. #define DAMAGETYPE_RADIAL            2        //radial damage
  22. #define DAMAGETYPE_VISIBLE            4        //damage to all entities visible to the projectile
  23. #define DAMAGETYPE_IGNOREARMOR    8        //projectile goes right through armor
  24.  
  25. #define WEAPONINDEX_GAUNTLET            1
  26. #define WEAPONINDEX_MACHINEGUN            2
  27. #define WEAPONINDEX_SHOTGUN                3
  28. #define WEAPONINDEX_GRENADE_LAUNCHER    4
  29. #define WEAPONINDEX_ROCKET_LAUNCHER        5
  30. #define WEAPONINDEX_LIGHTNING            6
  31. #define WEAPONINDEX_RAILGUN                7
  32. #define WEAPONINDEX_PLASMAGUN            8
  33. #define WEAPONINDEX_BFG                    9
  34. #define WEAPONINDEX_GRAPPLING_HOOK        10
  35.  
  36. //===========================================================================
  37. // Gauntlet
  38. //===========================================================================
  39.  
  40. projectileinfo //for Gauntlet
  41. {
  42.     name                "gauntletdamage"
  43.     damage                50
  44.     damagetype            DAMAGETYPE_IMPACT
  45. }
  46.  
  47. weaponinfo //Gauntlet
  48. {
  49.     name                "Gauntlet"
  50.     number                WEAPONINDEX_GAUNTLET
  51.     projectile            "gauntletdamage"
  52.     numprojectiles        1
  53.     speed                0
  54. } //end weaponinfo
  55.  
  56. //===========================================================================
  57. // Machinegun
  58. //===========================================================================
  59.  
  60. projectileinfo //for Machinegun
  61. {
  62.     name                "machinegunbullet"
  63.     damage                8
  64.     damagetype            DAMAGETYPE_IMPACT
  65. }
  66.  
  67. weaponinfo //Machinegun
  68. {
  69.     name                "Machinegun"
  70.     number                WEAPONINDEX_MACHINEGUN
  71.     projectile            "machinegunbullet"
  72.     numprojectiles        1
  73.     speed                0
  74. } //end weaponinfo
  75.  
  76. //===========================================================================
  77. // Shotgun
  78. //===========================================================================
  79.  
  80. projectileinfo //for Shotgun
  81. {
  82.     name                "shotgunbullet"
  83.     damage                10
  84.     damagetype            DAMAGETYPE_IMPACT
  85. }
  86.  
  87. weaponinfo //Shotgun
  88. {
  89.     name                "Shotgun"
  90.     number                WEAPONINDEX_SHOTGUN
  91.     projectile            "shotgunbullet"
  92.     numprojectiles        11
  93.     speed                0
  94. } //end weaponinfo
  95.  
  96. //===========================================================================
  97. // Grenade Launcher
  98. //===========================================================================
  99.  
  100. projectileinfo //for Grenade Launcher
  101. {
  102.     name                "grenade"
  103.     damage                120
  104.     radius                160
  105.     damagetype            $evalint(DAMAGETYPE_IMPACT|DAMAGETYPE_RADIAL)
  106. }
  107.  
  108. weaponinfo //Grenade Launcher
  109. {
  110.     name                "Grenade Launcher"
  111.     number                WEAPONINDEX_GRENADE_LAUNCHER
  112.     projectile            "grenade"
  113.     numprojectiles        1
  114.     speed                700
  115. } //end weaponinfo
  116.  
  117. //===========================================================================
  118. // Rocket Launcher
  119. //===========================================================================
  120.  
  121. projectileinfo //for Rocket Launcher
  122. {
  123.     name                "rocket"
  124.     damage                100
  125.     radius                120
  126.     damagetype            $evalint(DAMAGETYPE_IMPACT|DAMAGETYPE_RADIAL)
  127. }
  128.  
  129. weaponinfo //Rocket Launcher
  130. {
  131.     name                "Rocket Launcher"
  132.     number                WEAPONINDEX_ROCKET_LAUNCHER
  133.     projectile            "rocket"
  134.     numprojectiles        1
  135.     speed                900
  136. } //end weaponinfo
  137.  
  138. //===========================================================================
  139. // Lightning
  140. //===========================================================================
  141.  
  142. projectileinfo //for Lightning
  143. {
  144.     name                "lightning"
  145.     damage                24
  146.     damagetype            DAMAGETYPE_IMPACT
  147. }
  148.  
  149. weaponinfo //Railgun
  150. {
  151.     name                "Lightning Gun"
  152.     number                WEAPONINDEX_LIGHTNING
  153.     projectile            "lightning"
  154.     numprojectiles        1
  155.     speed                0
  156. } //end weaponinfo
  157.  
  158. //===========================================================================
  159. // Railgun
  160. //===========================================================================
  161.  
  162. projectileinfo //for Railgun
  163. {
  164.     name                "rail"
  165.     damage                100
  166.     damagetype            DAMAGETYPE_IMPACT
  167. }
  168.  
  169. weaponinfo //Railgun
  170. {
  171.     name                "Railgun"
  172.     number                WEAPONINDEX_RAILGUN
  173.     projectile            "rail"
  174.     numprojectiles        1
  175.     speed                0
  176. } //end weaponinfo
  177.  
  178. //===========================================================================
  179. // Plasma Gun
  180. //===========================================================================
  181.  
  182. projectileinfo //for Plasma Gun
  183. {
  184.     name                "plasma"
  185.     damage                20
  186.     radius                20
  187.     damagetype            $evalint(DAMAGETYPE_IMPACT|DAMAGETYPE_RADIAL)
  188. }
  189.  
  190. weaponinfo //Plasma Gun
  191. {
  192.     name                "Plasma Gun"
  193.     number                WEAPONINDEX_PLASMAGUN
  194.     projectile            "plasma"
  195.     numprojectiles        1
  196.     speed                2000
  197. } //end weaponinfo
  198.  
  199. //===========================================================================
  200. // BFG10K
  201. //===========================================================================
  202.  
  203. projectileinfo //for BFG10K
  204. {
  205.     name                "bfgexploision"
  206.     damage                40
  207.     radius                100
  208.     damagetype            $evalint(DAMAGETYPE_IMPACT|DAMAGETYPE_RADIAL)
  209. }
  210.  
  211. weaponinfo //BFG10K
  212. {
  213.     name                "BFG10K"
  214.     number                WEAPONINDEX_BFG
  215.     projectile            "bfgexploision"
  216.     numprojectiles        1
  217.     speed                0
  218. } //end weaponinfo
  219.  
  220.